#6月的第3个星期日是父亲节，由用户输入年份，算出该年的父亲节是哪一天
from datetime import *
Year = int(input('输入年份'))
j = 0
for i in range(1,31):
    Users_input = datetime(Year, 6, i)
    if datetime.strftime(Users_input,'%A') == 'Sunday':
        j+=1
        if j == 3:
            print(datetime.strftime(Users_input,'%Y年%m月%d日是父亲节'))